<?

echo "<table class=framed>";
echo "<tr><td colspan=3 class=tbhead ".help('help_alias').">Emailkonto och alias</td></tr>";

$sr=ldap_search($conn, "ou=Aliases,".$GLOBALS["dc"], "(rfc822MailMember=$name)");
$aliases = ldap_get_entries($conn, $sr);
$count = count($aliases) -1;

for ($i=0; $i < $count; $i++) {
	echo "<tr><td>email-alias:</td><td>".$aliases[$i]["cn"][0]."</td><td><a href=\"?s=ldap&mod=user&name=$name&delEmail=".$aliases[$i]["cn"][0]."&do=1\"><img src=images/delete.png border=0 ".help('user_del_email')."></a></td></tr>";
}

echo "<tr><td>lägg till email-alias: </td><td> <input type=text name=\"addEmail\" class=\"input-box\"></td></tr>";
echo "</table>";
?>
